//package io.yuanqi.hgtcshop.utils;
//import com.fasterxml.jackson.databind.ObjectMapper;
//
//import java.util.Map;
//
//public class JsonMapper {
//    private static final ObjectMapper objectMapper = new ObjectMapper();
//
//
//    private static final JsonMapper instance = new JsonMapper();
//
//    private JsonMapper() {
//        // private constructor to prevent instantiation
//    }
//
//    public static JsonMapper getInstance() {
//        return instance;
//    }
//
//    public static String toJson(Map<String, Object> map) {
//        try {
//            return objectMapper.writeValueAsString(map);
//        } catch (Exception e) {
//            e.printStackTrace();
//            return null;
//        }
//    }
//}
